<template>
  <div class="home">
    <div v-if="level == 7 || level == 9 || level == 4">
      <div class="title">
        待办事项
      </div>
      <div class="content">
        <div class="nav">
          <div class="left">
            我的代办事项
          </div>
          <div class="right">
            <div class="item">
              <el-date-picker
                v-model="timer"
                type="daterange"
                range-separator="至"
                start-placeholder="开始日期"
                end-placeholder="结束日期">
              </el-date-picker>
            </div>
            <div class="item">
              <i class="el-icon-date"></i>
            </div>
            <div class="item">
              <div class="active">本周</div>
              <div>本月</div>
              <div>本年</div>
            </div>
          </div>
        </div>
        <div class="toDo">
          <div class="to-item" @click="toPage">
            <div>待审核工资单</div>
            <img src="../../assets/img/one.png" alt="" style="width: 170px;height: 170px;">
            <div>23</div>
          </div>
          <div class="to-item">
            <div>待审核报销单</div>
            <img src="../../assets/img/x.png" alt="" style="width: 170px;height: 170px;">
            <div>342</div>
          </div>
          <div class="to-item">
            <div>待审核支付凭证</div>
            <img src="../../assets/img/y.png" alt="" style="width: 170px;height: 170px;">
            <div>123</div>
          </div>
        </div>
      </div>
    </div>
    <div v-else>
      <div class="title">
        <el-button type="primary" icon="el-icon-circle-plus-outline">新增报销</el-button>
      </div>
      <div class="content">
        <div class="nav">
          <div class="left">
            我的报销单
          </div>
          <div class="right">
            <div class="item">
              <el-date-picker
                v-model="timer"
                type="daterange"
                range-separator="至"
                start-placeholder="开始日期"
                end-placeholder="结束日期">
              </el-date-picker>
            </div>
            <div class="item">
              <i class="el-icon-date"></i>
            </div>
            <div class="item">
              <div class="active">本周</div>
              <div>本月</div>
              <div>本年</div>
            </div>
          </div>
        </div>
        <div class="toDo">
          列表未开发
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    data(){
      return {
        timer:'',
        level:''
      }
    },
    methods:{
      toPage(){
        this.$router.push({
          name: 'payAdmin',
          params: {
            keyWorld: 1
          }
        })
      }
    },
    created() {
      this.level = sessionStorage.getItem('level')
    }
  }
</script>

<style lang="less" scoped>
  .home{
    .title{
      height: 40px;
      background-color: rgb(126, 200, 240);
      color: #fff;
      line-height: 40px;
      width: 100px;
      border-radius: 5px;
      text-align: center;
    }
    .content{
      margin-top: 10px;
      border: 1px solid #eee;
      padding: 10px;
      .nav{
        display: flex;
        justify-content: space-between;
        .left{
          width: 150px;
          height: 43px;
          background-color: rgb(0, 183, 158);
          color: #fff;
          line-height: 43px;
          text-align: center;
        }
        .right{
          display: flex;
          justify-content: space-around;
          .item:nth-child(2){
            font-size: 29px;
            color: rgb(0, 183, 158);
            margin: 0 25px;
          }
          .item:last-child{
            display: flex;
            justify-content: space-around;
            div{
              border: 1px solid #eee;
              text-align: center;
              line-height: 43px;
              width: 55px;
            }
            div.active{
              color: #fff;
              background-color: rgb(0, 183, 158);
            }
          }
        }
      }
      .toDo{
        display: flex;
        border: 1px solid #eee;
        margin: 5px 0;
        .to-item{
          margin: 5px;
          width: 284px;
          height: 283px;
          border-color: rgb(174, 173, 173);
          border-width: 1px;
          border-style: solid;
          font-size: 14px;
          padding: 0px;
          text-align: center;
          div:first-child{
            font-family: SourceHanSansSC;
            font-weight: 400;
            font-size: 16px;
            color: rgb(142, 142, 144);
            font-style: normal;
            letter-spacing: 0px;
            line-height: 24px;
            text-decoration: none;
            text-align: left;
            padding: 10px 15px;
          }
          div:last-child{
            font-family: SourceHanSansSC;
            font-weight: 400;
            font-size: 28px;
            color: rgb(16, 16, 16);
            font-style: normal;
            letter-spacing: 0px;
            line-height: 42px;
            text-decoration: none;
          }
        }
      }
    }
  }
</style>
